<div class="vista_toolbar">
	<ul>
		<%= toolbar_add 'yhteys', 'conversations', customer %>
		<%= toolbar_delete_selected 'conversations' %>
		<%= toolbar_separator %>
		<li>
			<%= link_to image_tag('application_view_list.png', :title => 'Näytä lista'), customer_conversations_url(customer) %>
		</li>
	</ul>
</div>
<%form_remote_tag :url => destroy_selected_conversations_url, :confirm => 'Haluatko varmasti poistaa yhteydet?', :before => "spinnerOn('conversations');", :complete => "spinnerOff('conversations');", :method => :delete, :html => {:id => 'conversations_form'}do %><%if conversations.empty? %>
<div class="container">
    Ei yhteyksiä.
</div>
<%else %>
<div class="scrollable" style="height:15em">
    <%conversations.each do |conversation| %>
    <div class="container">
        <div style="float:right">
            <%=icon_edit 'conversations', conversation, customer %>
			<%=checkbox_delete_selected 'conversations', conversation.id %>
        </div>
        <%=content_tag :div, conversation.contacted_on.to_s + ' / ' + conversation.conversation_type, :class => 'date_and_type', :onclick => visual_effect(:toggle_blind, "conversation_details_" + conversation.id.to_s, :duration => 1.0) %><%=content_tag(:div, conversation.user.login + ' / ' + conversation.contact.last_name, :class => 'parties') unless conversation.contact.nil? %>
        <div style="display:none" id="conversation_details_<%=conversation.id%>">
            <%=content_tag :div, conversation.content, :class => 'content' %>
        </div>
        <div style="clear:both">
        </div>
    </div>
    <%end %>
</div>
<%end %>
<%end %>